home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / ifp1s157.zip / PAGE_10.PAS < prev    next >
Pascal/Delphi Source File  |  1993-06-26  |  6KB  |  273 lines

  1. unit page_10;
  2. interface
  3.  
  4. uses crt, dos, ifpglobl, ifpcomon;
  5.  
  6. procedure page10;
  7.  
  8. implementation
  9.  
  10. procedure page10;
  11.  
  12. var
  13.   i : 1..63;
  14.   xbool1 : boolean;
  15.   xbool2 : boolean;
  16.   xbool3 : boolean;
  17.   xchar : char;
  18.   xword1: word;
  19.   xword2: word;
  20.   regs: registers;
  21.   xbyte: byte;
  22.   count: word;
  23.   s: string;
  24.  
  25. procedure muxint(a : string; b : byte);
  26.   begin
  27.   caption3(a);
  28.   with regs do
  29.     begin
  30.     AH:=b;
  31.     AL:=0;
  32.     BX:=0;
  33.     CX:=0;
  34.     DX:=0;
  35.     Intr($2F, regs);
  36.     case AL of
  37.       $00 : Writeln('no; OK to load');
  38.       $01 : Writeln('no; not OK to load');
  39.       $FF, 2 : Writeln('yes')
  40.       else
  41.         unknown('status', AL, 2)
  42.     end
  43.     end
  44.   end;
  45.  
  46. function windev(device: byte): word;
  47.   var
  48.     regs: registers;
  49.     saveit: word;
  50.  
  51.   begin
  52.   with regs do
  53.     begin
  54.     AX:=$1682;
  55.     Intr($2F, regs);
  56.     AX:=$170A;
  57.     DX:=device;
  58.     Intr($2F, regs);
  59.     windev:=AX
  60.     end
  61.   end;
  62.  
  63.   begin (* procedure page_10 *)
  64.   caption1('');
  65.   Writeln('Multiplex interrupt ($2F)');
  66.   Window(1, 4, twidth div 2, tlength - 2);
  67.   muxint('DOS            ', $12);
  68.   muxint('DRIVER.SYS     ', $08);
  69.   muxint('DISPLAY.SYS    ', $B0);
  70.   muxint('ANSI.SYS       ', $1A);
  71.   muxint('EGA.SYS        ', $BC);
  72.   muxint('PRINT          ', $01);
  73.   muxint('ASSIGN         ', $06);
  74. (*
  75. **  Byte 12:12 p. 176C, Duncan, and many others, all of whom mistakenly give
  76. **  AH = $02
  77. *)
  78.   muxint('SHARE          ', $10);
  79. (*  muxint('FASTOPEN       ', $xx);*)
  80.   muxint('NLSFUNC        ', $14);
  81.   muxint('GRAFTABL (4.0-)', $B0);
  82.   caption3('GRAFTABL (5.0+)');
  83.   with regs do
  84.     begin
  85.     AX:=$2300;
  86.     BX:=0;
  87.     CX:=0;
  88.     DX:=0;
  89.     Intr($2F, regs);
  90.     if AH=$FF then
  91.       Writeln('yes')
  92.     else
  93.       Writeln('no; OK to load');
  94.     end;
  95. (*  muxint('KEYB           ', $B8);*)
  96.   muxint('NETBIOS append ', $87);
  97.   muxint('NETBIOS network', $88);
  98. (*  Byte 12:12 p. 180.  PC Tech Journal 3:11 p.104 gives AH = $BB  *)
  99.   muxint('SHELLB         ', $19);
  100.   muxint('XMA2EMS        ', $1B);
  101.   muxint('APPEND         ', $B7);
  102.   muxint('GRAPHICS.COM   ', $15);
  103.   muxint('Crit.err.handlr', $05);
  104.   pause3(-2);
  105.   if endit then
  106.     Exit;
  107.   caption3('CDROM          ');
  108.   with regs do
  109.     begin
  110.     AX:=$1500;
  111.     BX:=0;
  112.     Intr($2F, regs);
  113.     if BX = 0 then
  114.       Writeln('no; OK to load')
  115.     else
  116.       begin
  117.       Writeln('yes');
  118.       caption3('  on drives');
  119.       Write(Chr(CX + 65));
  120.       caption3('through');
  121.       Writeln(Chr(CX + BX + 65 - 1))
  122.       end;
  123.     end;
  124.   caption3('Network        ');
  125.   with regs do
  126.     begin
  127.     AX:=$B800;
  128.     Intr($2F, regs);
  129.     if AL = 0 then
  130.       Writeln('no; OK to load')
  131.     else
  132.       begin
  133.       Write('yes');
  134.       caption3('is a');
  135.       if BX and $0040 = $40 then
  136.         Writeln('server')
  137.       else
  138.         if BX and $0004 = $4 then
  139.           Writeln('messenger')
  140.         else
  141.           if BX and $0080 = $80 then
  142.             Writeln('receiver')
  143.           else
  144.             if BX and $0008 = $8 then
  145.               Writeln('redirector');
  146.       end;
  147.     end;
  148.   muxint('DOSKEY         ', $48);
  149.   caption3('DOS Extender   ');
  150.   with regs do
  151.     begin
  152.     AX:=$F100;
  153.     BX:=0;
  154.     CX:=0;
  155.     DX:=0;
  156.     Intr($2F, regs);
  157.     if (AL = $FF) and (SI =$444F {DO}) and (DI = $5358 {SX}) then
  158.       Writeln('yes')
  159.     else
  160.       Writeln('no; OK to load');
  161.     end;
  162.   window(1 + twidth div 2, 3, twidth, tlength - 3);
  163.   if osmajor >=4 then
  164.     with regs do
  165.       begin
  166.       AX:=$B700;
  167.       Intr($2F, regs);
  168.       if AL=$FF then
  169.         begin
  170.         caption2('APPEND ');
  171.         AX:=$B706;
  172.         Intr($2F, regs);
  173.         if (BX and 1) = 1 then
  174.           Write('enabled ');
  175.         if (BX and $2000) = $2000 then
  176.           Write('/PATH ');
  177.         if (BX and $4000) = $4000 then
  178.           Write('/E ');
  179.         if (BX and $8000) = $8000 then
  180.           Write('/X');
  181.         Writeln;
  182.         caption2('APPEND path');
  183.         AX:=$B704;
  184.         Intr($2F, regs);
  185.         while Mem[ES:DI] <> 0 do
  186.           begin
  187.           Write(Chr(mem[ES:DI]));
  188.           Inc(DI)
  189.           end;
  190.         Writeln
  191.         end
  192.       end;
  193.   with regs do
  194.     begin
  195.     AX:=$0100;
  196.     intr($2F, regs);
  197.     if AL = $FF then
  198.       begin
  199.       caption2('PRINT queue');
  200.       AX:=$0104;
  201.       intr($2F, regs);
  202.       xbool1:=true;
  203.       xbool2:=false;
  204.       repeat
  205.         xchar:=char(mem[DS : SI]);
  206.         if xchar > #0 then
  207.           begin
  208.           if xbool1 then
  209.             begin
  210.             xbool1:=false;
  211.             Writeln;
  212.             window(2 + twidth div 2, wherey + hi(windmin), twidth, tlength - 3)
  213.             end;
  214.           pause2;
  215.           if endit then
  216.             Exit;
  217.           Write(xchar);
  218.           i:=1;
  219.           xbool3:=false;
  220.           repeat
  221.             xchar:=char(mem[DS : SI + i]);
  222.             if xchar > #0 then
  223.               begin
  224.               Write(xchar);
  225.               inc(i)
  226.               end
  227.             else
  228.               begin
  229.               Writeln;
  230.               xbool3:=true
  231.               end
  232.           until xbool3;
  233.           inc(SI, 64)
  234.           end
  235.         else
  236.           xbool2:=true
  237.       until xbool2;
  238.       if xbool1 then
  239.         Writeln('(empty)');
  240.       AX:=$0105;
  241.       Intr($2F, regs)
  242.       end;
  243.     end;
  244.   if osmajor = 5 then
  245.     begin
  246.     xword1:=MemW[devseg:devofs + $39];
  247.     xword2:=MemW[devseg:devofs + $37];
  248.     if (xword1 <> 0) and (xword2 <> 0) then
  249.       begin
  250.       caption2('SETVER list at ');
  251.       segofs(xword1, xword2);
  252.       Writeln;
  253.       while Mem[xword1:xword2] <> 0 do
  254.         begin
  255.         xbyte:=Mem[xword1:xword2];
  256.         Inc(xword2);
  257.         s:='';
  258.         for count:=xword2 to xword2 + (xbyte - 1) do
  259.           s:=s + Chr(Mem[xword1: count]);
  260.         Inc(xword2, xbyte);
  261.         Write(s, ' ':(14 - Length(s)), Mem[xword1:xword2], decimal);
  262.         zeropad(mem[xword1:xword2 + 1]);
  263.         Writeln;
  264.         pause2;
  265.         if endit then
  266.           Exit;
  267.         Inc(xword2, 2);
  268.         end;
  269.       end
  270.    end;
  271.    end;
  272. end.
  273.